package en.edu.cuit.aumalls.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import cn.edu.cuit.aumalls.entity.Goods;

public interface GoodsMapper {

	@Select("select * from goods")
	List<Goods> findAll();
	
	@Select("select * from goods where goods_id = #{goodsId}")
	Goods findGoodsById(@Param("goodsId") int goodsId);
	
	@Select("select goods_type from goods where goods_id = #{goodsId}")
	int findGoodsTypeByGoodsId(@Param("goodsId") int goodsId);
	
	@Select("select * from goods where goods_type = #{goods_type}")
	List<Goods> findGoodsByType(@Param("goods_type") int goods_type);
}
